package core.tool.bpe.action;

import java.io.IOException;

import core.tool.bpe.Action;
import core.tool.bpe.BpeContext;
import core.tool.common.RuntimeHelper;
import core.tool.xml.dom4j.jaxb.XmlHelper;

public class RuntimeAction extends Action {

	@Override
	protected boolean execute(BpeContext bpeContext) {
		String command=XmlHelper.getElementAttribute(bpeContext.getElement(), "runProgram");
		try {
			RuntimeHelper.run(command);
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}

}
